/*
 * NCorpsGui.java
 *
 * Created on 4 mars 2009, 21:29:17
 */
package ncorps.gui;

/**
 *
 * @author Gilles
 */
public class NCorpsGui extends javax.swing.JFrame {

    /** Creates new form NCorpsGui */
    public NCorpsGui() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainboard = new javax.swing.JPanel();
        parametres = new javax.swing.JButton();
        Title = new javax.swing.JPanel();
        titre = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("NCorps");
        setResizable(false);

        parametres.setText("Paramètres");
        parametres.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                parametresActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout mainboardLayout = new javax.swing.GroupLayout(mainboard);
        mainboard.setLayout(mainboardLayout);
        mainboardLayout.setHorizontalGroup(
            mainboardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainboardLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(parametres, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(439, Short.MAX_VALUE))
        );
        mainboardLayout.setVerticalGroup(
            mainboardLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, mainboardLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(parametres, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(mainboard, java.awt.BorderLayout.CENTER);

        titre.setEditable(false);
        titre.setFont(new java.awt.Font("Tahoma", 1, 12));
        titre.setText("     N Corps gravitationnels  -  Outils de résolution - Méhtode FFT  ou classique");

        jButton1.setFont(new java.awt.Font("Tahoma", 1, 11));
        jButton1.setText("Quit");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout TitleLayout = new javax.swing.GroupLayout(Title);
        Title.setLayout(TitleLayout);
        TitleLayout.setHorizontalGroup(
            TitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TitleLayout.createSequentialGroup()
                .addComponent(titre, javax.swing.GroupLayout.DEFAULT_SIZE, 498, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1))
        );
        TitleLayout.setVerticalGroup(
            TitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(TitleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(titre, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        getContentPane().add(Title, java.awt.BorderLayout.PAGE_START);

        setSize(new java.awt.Dimension(567, 123));
    }// </editor-fold>//GEN-END:initComponents

    private void parametresActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_parametresActionPerformed
        new ParametersWindow(this);
}//GEN-LAST:event_parametresActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        System.exit(0);
    }//GEN-LAST:event_jButton1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new NCorpsGui().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel Title;
    private javax.swing.JButton jButton1;
    private javax.swing.JPanel mainboard;
    private javax.swing.JButton parametres;
    private javax.swing.JTextField titre;
    // End of variables declaration//GEN-END:variables
}
